package com.practise.rabbitmqdemo.listen;

import com.practise.rabbitmqdemo.config.FanoutRabbitConfig;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
@RabbitListener(queues = {FanoutRabbitConfig.Fanout_QUEUE_A,FanoutRabbitConfig.Fanout_QUEUE_B,FanoutRabbitConfig.Fanout_QUEUE_C})
public class FanoutReceiver {

    @RabbitHandler
    public void process(String msg) {
        System.out.println("FanoutReceiver消费者收到消息  : " + msg);
    }
}